{extend name="public/base" /}{block name="body"}
<div class="ibox float-e-margins">
	<div class="content-tabs">
		<ol class="breadcrumb">
			<li>
				<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
			</li>
			<li><strong>广告管理</strong></li>
		</ol>
	</div>
	<div class="ibox-content">
		<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('adsmanage')}">
				<div class="form-group" style="padding-left: 20px;">
					标题 <input type="text" id="title" name="title" value="" placeholder="请输入标题" class="bank" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					时间 <input id='add_time' name='add_time' onclick='WdatePicker()' type='text' placeholder="开始时间" class='bank' />
					<input id='end_time' name='end_time' onclick='WdatePicker()' type='text' placeholder="结束时间" class='bank' />
					<span class="bank" style="border-radius:0px;border:1px;"><button type="submit" class="btn btn-sm btn-primary"><li class="fa fa-search"> 查询</li></button> </span>
				</div>
		</form>
		<a href="{:url('add')}" class="btn btn-xs btn-primary">添加广告</a>
		<div class="example-wrap">
			<div class="example">
				<table class="table table-bordered table-hover">
					<thead>
						<tr class="long-tr">
							<th>ID</th>
							<th>图片</th>
							<th>标题</th>
							<th>跳转url</th>
							<th>广告类型</th>
							<th>价格</th>
							<th>时间</th>
							<th>浏览量</th>
							<th>排序</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody id="list">
						{volist name="list" id='ad'}
						<tr>
							<td>{$ad.id}</td>
							<td><img src="{$ad.thumb}" width="50px" /></td>
							<td>{$ad.title}</td>
							<td>{$ad.url}</td>
							<td>{if $ad.type==1} 首页轮播 {elseif $ad.type==2} 云拼团 {elseif $ad.type==3} 今日秒杀 {elseif $ad.type==4} 特色馆 {/if}
							</td>
							<td>{$ad.price}</td>
							<td>{$ad.add_time}</td>
							<td>{$ad.click}</td>
							<td>{$ad.sort}</td>
							<td>
								<a href="{:url('edit',['id'=>$ad.id])}" class="btn btn-primary bnt-sm">
									<i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp;
								<a href="{:url('delete',['id'=>$ad.id])}" class="btn btn-danger bnt-sm ajax-delete">
									<i class="fa fa-trash-o"></i> 删除</a>
							</td>
						</tr>
						{/volist}
					</tbody>
				</table>
				<div style="text-align: right;">
					{$list->render()}
				</div>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
</script>
<style>
	.bank {
		width: 150px;
		height: 30px;
		text-align: center;
		border-radius: 5px;
	}
</style>
{/block}